﻿using System.Collections.Generic;
using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using FwProject.Roles.Dto;
using Microsoft.AspNetCore.Mvc;

namespace FwProject.Roles
{
    public interface IRoleAppService : IAsyncCrudAppService<RoleDto, int, PagedResultRequestDto, CreateRoleDto, RoleDto>
    {
        Task<ListResultDto<PermissionDto>> GetAllPermissions();
        
        [HttpGet]
        Task<X.PagedList.IPagedList<RoleOutputDto>> GetPagedListAsync(int pageIdx, int pageSize);


        Task<List<RoleOutputDto>> GetAllAsync(string keyword);

        Task UpdatePermissionsAsync(int id, RolePermissionsUpdateDto input);

        Task<int> CreateAndGetIdAsync(RoleEnterDto input);

        Task<RoleEnterDto> GetEnterEntityAsync(int id);

        Task UpdateAsync(int id, RoleEnterDto input);

        Task DeleteAsync(int id);
    }
}
